Conditions | 5 |
Total Lines | 8 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { getGlobalConfiguration, SETTINGS_websiteShowNotificationsCountInTab } from '../configuration/configuration'; |
||
18 | |||
19 | function getNotificationCount(): number { |
||
20 | if (core.isLoggedIn()) { |
||
21 | let menuUserText = document.getElementById('materialize-menu-dropdown').innerText.split('\n')[4]; |
||
22 | let notificationCount = parseInt(menuUserText.match(/\d+/)?.[0]) ?? 0; |
||
23 | return notificationCount; |
||
24 | } else { |
||
25 | return 0; |
||
26 | } |
||
38 | } |